/**
 * Created by Mark_ren on 2016/11/28.
 * 苟富贵,無相忘
 */
var moment = require("moment");
var co = require('co');
var seqModule = require('../../../routes/createModules');
var seq = new seqModule();
var util = require('../../../common/util');


var qdQrController = {
    getQrbyQrCode: function (req, res) {
        co(function () {
            var paramT = {};
            var include = [{ model: seq.qdWjArticleModule }];
            paramT.include = include;
            paramT.where = req.params;
            paramT.order = [["createTime", "DESC"]];
            seq.qdQrModule.findOne(paramT).then(function (result) {
                res.json({ 'success': true, 'msg': '查询成功', 'result': result });
            })

        }).catch(function (e) {
            res.json({ 'success': false, 'msg': '查询失败' });
            console.log(e);
        })
    }

}
module.exports = qdQrController;